# Base Image
FROM php:5.5-fpm

# Author
MAINTAINER c32 amd5@qq.com

# setting time
ENV TZ=AsiaShanghai

# System commod
RUN ln -snf usrsharezoneinfo$TZ etclocaltime && echo $TZ  etctimezone
ADD ./sources.list /etc/apt/sources.list

RUN apt-get update \
	&& apt-get install --assume-yes \
		apt-utils \
		libfreetype6-dev \
		libjpeg62-turbo-dev \
		libpng-dev \
		libmcrypt-dev \
    # install ext
    && docker-php-ext-install pdo_mysql \
    && docker-php-ext-install -j$(nproc) mcrypt \
    # install custom ext
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd